package com.valuegroup.smarttodo.data.vo;

import com.valuegroup.smarttodo.plugins.pickdialog.DateUtils;

import java.io.Serializable;
import java.util.Date;

public class WeekPlanQueryParams implements Serializable {

    // 查询范围
    private int range; // 0 近三周,1指定某周
    private int year;
    private int week;

    private boolean yearOrderAsc = true;

    public static WeekPlanQueryParams getDefaultParams() {
        WeekPlanQueryParams p = new WeekPlanQueryParams();
        Date today = new Date();
        p.setRange(0);
        p.setWeek(DateUtils.getWeekOfYear(today));
        p.setYear(DateUtils.getYear(today));
        p.setYearOrderAsc(true);
        return p;
    }

    public boolean isYearOrderAsc() {
        return yearOrderAsc;
    }

    public void setYearOrderAsc(boolean yearOrderAsc) {
        this.yearOrderAsc = yearOrderAsc;
    }

    public int getRange() {
        return range;
    }

    public void setRange(int range) {
        this.range = range;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getWeek() {
        return week;
    }

    public void setWeek(int week) {
        this.week = week;
    }
}